package com.ms.demo;

import java.util.ArrayList;
import java.util.List;

/**
 * @description: 备忘录管理者
 * @author: ms
 * @create: 2022-10-27 17:27
 */
public class CareTaker {

    private List<Memento> mementoList = new ArrayList<>();

    public void add(Memento state){
        mementoList.add(state);
    }

    public Memento get(int index){
        return mementoList.get(index);
    }
}